home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
usr
/
sybase
/
doc
/
bcp_collen.man
< prev
next >
Wrap
Text File
|
1993-04-22
|
3KB
|
89 lines
1 Version 4.0 -- 5/1/89 bcp_collen
______________________________________________________________________
NAME: bcp_collen
FUNCTION:
Set the program variable data length for the current copy IN.
SYNTAX:
RETCODE bcp_collen(dbproc, varlen, table_column)
DBPROCESS *dbproc;
DBINT varlen;
int table_column;
bcp_collen Version 4.0 -- 5/1/89 2
______________________________________________________________________
COMMENTS:
o The bcp_collen() function allows you to change the program
variable data length for a particular column while running a
copy IN via calls to bcp_bind().
o Initially, the program variable data length is determined when
bcp_bind() is called. If the program variable data length
changes between calls to bcp_sendrow(), and no length prefix or
terminator is being used, you may call bcp_collen() to reset
the length. The next call to bcp_sendrow() will use the length
you just set.
o There must be a separate bcp_collen() call for every column in
the table whose data length you want to modify.
o For information on the bcp utility program, see its manual page
in the Commands Reference.
3 Version 4.0 -- 5/1/89 bcp_collen
______________________________________________________________________
PARAMETERS:
dbproc - A pointer to the DBPROCESS structure that provides the
connection for a particular front-end/SQL Server process. It
contains all the information that DB-Library uses to manage
communications and data between the front end and SQL Server.
varlen - The length of the program variable, which does not
include the length of the length prefix or terminator. Set-
ting varlen to 0 signifies that the data is NULL. Setting it
to -1 signifies that the data is variable-length and that the
length will be determined by the length prefix or terminator.
If both a length prefix and a terminator exist, bcp will use
the one that results in the shortest amount of data being
copied.
table_column - The column in the SQL Server table to which the
data will be copied. Column numbers start at 1.
bcp_collen Version 4.0 -- 5/1/89 4
______________________________________________________________________
RETURNS:
SUCCEED or FAIL.
SEE ALSO:
bcp_bind, bcp_colptr, bcp_sendrow